package com.fuhao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fuhao.dao.impl.TestDao;
import com.fuhao.entity.Person;
import com.fuhao.service.TestService;

@RestController
public class TestController {

	@RequestMapping("/test")
	public String test() {
		return "test";
	}
	
	@Autowired
	private TestService testService;
	
	@RequestMapping("/save")
	public void save() {
		Person person = new Person();
		person.setUsername("zhang四");
		testService.save(person);
	}
	

	
	@RequestMapping("/a")
	public void qw() {
		testService.a();
	}
	
}
